QuickOPC User's Guide and Reference
Examples for OPC Unified Architecture (OPC-UA)
Examples > Examples in the Product and on the Web > .NET and Python Examples > Examples for OPC Unified Architecture (OPC-UA)
In This Topic

Console Examples

 

C#

VB.NET

F#

C++/CLI

PowerShell

Python (.NET)

MultiTargetUADocExamples: A large collection of OPC-UA console-based examples that illustrate the use of individual objects in the product, and their members. These are the same examples that appear in reference and conceptual documentation, with an extra control routine that allows the use to choose an example to be performed.

Note: The amount of available example material may differ between the languages.

 

UAConsoleApplication1: The simplest console application. Reads and displays an OPC-UA node value in a console.

 

 

 

 

 

UAConsoleLiveMapping: Creates an object structure for a boiler, describes its mapping into OPC Unified Architecture server using attributes, and then performs the live mapping. Boiler data is then read, written and/or subscribed to using plain .NET object access.

 

 

 

 

UALogAsStringToSql: Logs OPC Unified Architecture data changes into an SQL database, using a subscription. Values of all data types are stored in a single NVARCHAR column.

 

 

 

 

 

UALogAsUnionToSql: Logs OPC Unified Architecture data changes into an SQL database, using a subscription. Values of different data types are stored in separate columns.

 

 

 

 

 

UANetSdkConfiguration: Shows how to configure the OPC UA .NET stack and SDK using its configuration file (XML).

 

 

 

 

 

UASimpleLogToSql: Logs OPC Unified Architecture data changes into an SQL database, using a subscription. Values of all data types are stored in a single SQL_VARIANT column.

 

 

 

 

 

UASubscribeFromXml: Loads a list of OPC Unified Architecture items from an XML file and subscribes to them.

 

 

 

 

 

UAWcfClient1: Using a Web service provided by the UAWcfService1 project (under Web folder), gets and displays a value of an OPC UA variable.

 

 

 

 

 

UAXmlEventLogger: Logs OPC UA Alarms&Conditions event notifications into an XML file.

 

 

 

 

 

UAXmlLogger: Logs OPC Unified Architecture data changes into an XML file.

 

 

 

 

 

 

Web Examples

 

C#

VB.NET

F#

C++/CLI

UAAutoRefreshWeb: Web application with a screen that refreshes itself periodically with OPC UA values.

 

 

 

UABrowseNodesWeb: Browses nodes in an OPC UA server (ASP.NET Web application).

 

 

 

UADataGridWebApplication: Demonstrates how easily can WebControls.GridView be populated with data read from OPC UA server.

 

 

 

UADiscoverServersWeb: Discovers the available OPC UA servers (ASP.NET Web application).

 

 

 

UAWcfService1: A simple Web service using WCF technology. Provides a GetData method to read a value of an OPC UA variable. Use UAWcfClient1 project (under Console folder) to test this Web service.

 

 

 

UAWebApplication1: The simplest ASP.NET Web application for OPC-UA. Reads and displays a value of a node in an OPC-UA server.

 

 

UAWebService1: A simple Web service using ASMX technology. Provides "Hello World" method to read a value of an OPC UA item.

 

 

 

 

Windows Forms Examples

 

C#

VB.NET

F#

C++/CLI

Python (.NET)

EasyOpcUADemo: This is a source of the Windows Forms Demo application for OPC-UA that ships with QuickOPC. The application shows the most important product functions, including event-based subscriptions.

 

 

 

EasyOpcUAPubSubDemo: This is a source of the WPF Demo application for OPC-UA PubSub that ships with QuickOPC. The application offers a selection of ready-made settings for various OPC UA PubSub subscription choices, and also offers a rich user interface to specify custom settings. It then allows to subscribe to datasets and display the received data dynamically.

 

 

 

 

UAFormsDocExamples: A collection of OPC-UA Windows Forms-based examples that illustrate the use of individual objects in the product, and their members. These are the same examples that appear in reference and conceptual documentation, with an extra control routine that allows the use to choose an example to be performed.

Note: The amount of available example material may differ between the languages.

 

 

 

UALiveBindingDemo: Shows live binding of OPC Unified Architecture information (from sample OPC-UA server) to standard Windows Forms controls (Microsoft). All binding to OPC-UA data is achieved with no manual coding, only by configuring the components in Visual Studio.

               
OPC-UA Live Binding Demo

OPC-UA Live Binding Demo

 

 

 

UALiveBindingDemo2: Shows advanced live binding features in OPC UA. Among others, it demonstrates:

·         Binding kinds: binding to local vs. UTC timestamp.

·         Conversions: Use of LinearConverter, even bi-directionally.

·         Animations: Moving a control around the form, depending on an OPC tag value.

·         Cumulative: Adding incoming values to ListBox or ListView.

 

 

 

 

UASubscribeToMany: Demonstrates and measures performance with large number of subscribed OPC UA data items.

 

 

 

 

UAValueToMessageBox: Very simple Windows Forms application that reads and displays an OPC UA node value in a message box after the user clicks on a button.

 

 

 

 

UAWindowsFormsApplication1: The simplest Windows Forms application. Reads and displays an OPC UA node value on a form. This is what you get if you follow the steps described in Quick Start for QuickOPC.NET.

 

 

 

 

Windows Service Examples

 

C#

VB.NET

F#

C++/CLI

UAWindowsService1: A Windows Service that subscribes to variables from the OPC UA sample server, and logs their changes into a file.

 

 

 

 

WPF Examples

Authoring Note

 

C#

VB.NET

F#

C++/CLI

UAWpfApplication1: The simplest WPF application for OPC UA. Reads and displays an OPC node value.

 

 

 

UAWpfScreen: Shows how to update WPF controls with dynamic OPC-UA data.

 

 

 

WpfEasyOpcUADemo: This is a source of the WPF Demo application for OPC-UA that ships with QuickOPC. The application shows the most important product functions, including event-based subscriptions.

 

 

 

 

See Also

Knowledge Base